<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<div region="center" style="padding:5px;" border="false">
	<table id="courierList">
		<thead>
			<tr>
				<th data-options="field:'courierId',width:50,hidden:true">ID</th>
				<th data-options="field:'company',width:100,formatter: function(value,row,index){
		        			if(value){
								return value;
							}
							return '未知';
		        		}">所属公司</th>
				<th data-options="field:'express',width:100,formatter: function(value,row,index){
		        			if(value){
								return value.expressName;
							}
							return '未知';
		        		}">所属快递网点</th>
				<th data-options="field:'courierName',width:100">快递员姓名</th>
				<th data-options="field:'mobileNum',width:100">手机号码</th>
				<th data-options="field:'pwd',width:100">密码</th>
				<th data-options="field:'sernum',width:100">序列号</th>
				<th data-options="field:'rfid',width:100">RFID</th>
				<th data-options="field:'offLineTime',width:100,formatter: function(value,row,index){
		        			if(value){
								switch(value){
									case 0:return '24小时内登录过';
									case -1:return '从未存过件';
									default:return value+'天未登录';
								}
							}
							return '未知';
		        		}">登录情况</th>
				<th data-options="field:'saveNum',width:100">存件数</th>
				<th data-options="field:'errorRate',width:100">存错率</th>
				<th data-options="field:'status',width:100,formatter: function(value,row,index){
		        			if(value){
								switch(value){
									case 0:return '正常';
									case 1:return '已删除';
									case 4:return '已禁用';
									default: break;
								}
							}
							return '未知';
		        		}">状态</th>
			</tr>
		</thead>
	
		<%--<tbody>
				<s:if test="courierPage.list.size()==0">
		    	<tr class="odd">
				  <td colspan="12">=_=没有找到任何记录。。。。。。。。</td>
				</tr>
		       </s:if>
			<s:iterator value="courierPage.list" var="courier" status="st">
				<tr class="odd">
					<td class="center "><s:property value="#st.index+1" /></td>
					<td class="center "><s:property value="#courier.express.company.companyName" /></td>
					<td class="center "><s:property value="#courier.express.expressName" /></td>
					<td class="center "><s:property value="#courier.courierName" /></td>
					<td class="center "><s:property value="#courier.mobileNum" /></td>
					<td class="center "><s:property value="#courier.pwd" /></td>
					<td class="center "><s:property value="#courier.rfid" /></td>
					<td class="center "><s:property value="#courier.sernum" /></td>
					<td class="center ">
						<s:if test="#courier.offLineTime==0">
							24小时内登录过
						</s:if>
						<s:elseif test="#courier.offLineTime==-1">
							从未存过件
						</s:elseif>
						<s:else>
							<s:property value="#courier.offLineTime" />天未登录
						</s:else>
					</td>
					<td class="center "><s:property value="#courier.saveNum" />/<s:property value="#courier.errorRate" /></td>
					<td class="center ">
						<s:if test="#courier.status==0">
						正常
						</s:if>
						<s:elseif test="#courier.status==1">
						已删除
						</s:elseif>
						<s:elseif test="#courier.status==4">
						已禁用
						</s:elseif>
						<s:else>
						-_-
						</s:else>
					</td>
					<td class="center "> 
						<a class="ajax-link" href="getCourierById?courierID=<s:property value="#courier.courierId" />&expressId=<s:property value="#courier.express.expressId" />">
							修改
						</a>|
						<a class="ajax-link" href="deleteCourier?courierID=<s:property value="#courier.courierId" />&expressId=<s:property value="#courier.express.expressId" />">
							删除
						</a>|
						<a class="ajax-link" href="express!getExpressDetail?expressId=<s:property value="#courier.express.expressId" />">
							所属网点
						</a>|
						<a class="ajax-link" href="package!getCourierStore?courierID=<s:property value="#courier.courierId" />">
							存件情况
						</a>|
						<s:if test="status==0">
						<a class="ajax-link" href="signCourier?flag=4&courierID=<s:property value="#courier.courierId" />">
							禁用
						</a>
						</s:if>
						<s:else>
						<a class="ajax-link" href="signCourier?flag=0&courierID=<s:property value="#courier.courierId" />">
							启用
						</a>
						</s:else>
					</td>
					<s:else>
					<td class="center "> 
					</td>
					</s:else>
				</tr>
			</s:iterator>
		</tbody>
	--%></table>
</div>
<!-- 增加 -->
<div id="courier_addDialog"></div>
<!-- 修改 -->
<div id="courier_updateDialog"></div>
<script type="text/javascript" src="<%=path%>/js/system/courier/courier.js"></script>